import request from '@/utils/request'
import { autograph } from '@/utils/autograph'

// 获取充电桩列表
export function chargeList(query) {
  const url = '/admin/charge/index'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 添加充电桩数据
export function createCharge(query) {
  const url = '/admin/charge/store'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 删除充电桩数据
export function deleteCharge(query) {
  const url = '/admin/charge/update'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 删除充电桩数据
export function updateCharge(query) {
  const url = '/admin/charge/update'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 仪器列表查看
export function instrumentList(query) {
  const url = '/admin/instrumentList'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 仪器删除
export function deleteInstrument(query) {
  const url = '/admin/deleteInstrument'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 仪器添加
export function createInstrument(query) {
  const url = '/admin/addInstrument'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 仪器修改
export function updateInstrument(query) {
  const url = '/admin/updateInstrument'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 充电桩检测项目列表
export function projectList(query) {
  const url = '/admin/project/index'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 充电桩检测项目顶级类型
export function projectCate(query) {
  const url = '/admin/project/cate'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 充电桩检测项目添加
export function createProject(query) {
  const url = '/admin/project/store'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 充电桩检测项目删除
export function deleteProject(query) {
  const url = '/admin/project/update'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 充电桩检测项目修改
export function updateProject(query) {
  const url = '/admin/project/update'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 任务工单列表
export function orderList(query) {
  const url = '/admin/orderList'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 任务工单属性
export function orderAttr(query) {
  const url = '/admin/orderAttr'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 任务工单添加
export function createOrder(query) {
  const url = '/admin/addOrder'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}
// 任务工单 修改
export function updateOrder(query) {
  const url = '/admin/updateOrder'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 任务工单 删除
export function deleteOrder(query) {
  const url = '/admin/deleteOrder'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 检测数据列表
export function detectionList(query) {
  const url = '/admin/detectionList'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 检测报告列表
export function reportList(query) {
  const url = '/admin/reportList'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 检测报告 删除
export function deleteReport(query) {
  const url = '/admin/deleteReport'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 工单查看检测项目
export function orderProject(query) {
  const url = '/admin/orderProject'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}

// 图形统计
export function getGd(query) {
  const url = '/admin/getGd'
  const data = autograph(url, query)
  return request({
    url: url,
    method: 'post',
    data
  })
}
